package com.lzy.token.user;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author lzy by 2019/9/16 20:19
 */
@Data
@EqualsAndHashCode
@ToString
public class DefaultUserDetails<T> implements TokenUserDetails<T> {

    private Long id;

    private Integer type;

    private String username;

    private String headImg;

    private String phone;

    private Long roleId;

    private T resources;

    @Override
    public Long getId() {
        return id;
    }

    @Override
    public Integer getType() {
        return type;
    }

    @Override
    public String getUsername() {
        return username;
    }

    public String getHeadImg() {
        return headImg;
    }

    public String getPhone() {
        return phone;
    }

    @Override
    public T getResources() {
        return resources;
    }
}
